package com.baidu.day04;

public class User {
    //用户登录案例
   String username;
   String password;
   public User(){
       this.username = "admin";
       this.password = "123456";
   }



    public void login(String username,String password)
    {
        if (this.username.equals(username)&&this.password.equals(password)){
            System.out.println("登录成功");
        }else {
            System.out.println("登录失败");
        }

    }
}
